﻿namespace K9Nano.Share
{
    public static class K9SharedConstants
    {
        #region Claim
        /* JWT */
        public const string TenantIdClaimType = "tenant";
        public const string UserIdClaimType = "sub";
        public const string RoleClaimType = "role";
        public const string EmailClaimType = "email";
        public const string GenderClaimType = "gender";
        public const string ProfileClaimType = "profile";
        public const string PhoneNumberClaimType = "phone_number";
        /// <summary>
        /// UserName/用户名
        /// </summary>
        public const string UserNameClaimType = "preferred_username";
        /// <summary>
        /// 姓名
        /// </summary>
        public const string NameClaimType = "name";
        public const string ClientIdClaimType = "client_id";    

        #endregion

        #region Api

        public const string ApiScopeInternal = "internal-api";
        public const string ApiScopeAdmin = "admin";

        #endregion

        #region Settings

        public const string SettingAppName = "AppName";

        public const string SettingAppDescription = "AppDescription";

        #endregion

        #region GrantTypes

        /// <summary>
        /// 微信公众号授权
        /// </summary>
        public const string GrantTypeWeixinMP = "weixinmp";

        public const string OpenId = "openid";

        public const string UnionId = "unionid";

        public const string Phone = "phone";

        public const string AppId = "appid";

        #endregion

        #region Database

        public const string SharedSchemePlaceholder = "__shared__";

        #endregion

        #region Roles

        public const string RoleAdmin = "admin";

        #endregion

        #region Authorization

        public const string PolicyAdmin = "admin";
        public const string PolicyTenantAdmin = "tenant.admin";

        #endregion
    }
}